<?php
class Myblog_Form_Login extends Zend_Form
{
	public function init()
	{
	$this->setAction('/admin/login')
		->setMethod('POST')
		->setName('Login');
		
	$username=new Zend_Form_Element_Text('userlogin');
	$username->setOptions(array('size'=>'20','placeholder'=>'Логин','autocomplete'=>'off'))
		->setRequired(true)
		->addValidator('NotEmpty')
		->addFilter('HtmlEntities')
		->removeDecorator('Label','dt')
		->addFilters(array('StringTrim','StripTags','StringToLower'));
		
	$userpass=new Zend_Form_Element_Password('userpass');
	$userpass->setOptions(array('size'=>'20','placeholder'=>'Пароль','autocomplete'=>'off'))
		->setRequired(true)
		->addValidators(array('NotEmpty'))
		->addFilters(array('HtmlEntities','StringTrim','StripTags'));
		

	$submit=new Zend_Form_Element_Submit('submit');
	$submit->setLabel('Войти')
		->setOptions(array('class'=>'submit'));
	$this->addElements(array($username,$userpass,$submit));
	}

}

?>
